<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>05_探索instanceof</title>
</head>
<body>
<!--
1、instanceof是如何判断的
    * 表达式：A instanceof B
    * 如果B函数的显示原型对象在A对象的原型链上，返回true，否则返回false

2、Function是通过new自己产生的实例
-->
<script>
function Foo() {

}

var foo = new Foo();
console.log(foo instanceof Foo) // true
console.log(foo instanceof Function) // false
console.log(foo instanceof Object) // true

console.log("-----------------------------")

console.log(Object instanceof Function) // true
console.log(Object instanceof Object) // true
console.log(Function instanceof Function) // true
console.log(Function instanceof Object) // true

console.log(Object instanceof Foo) // false
</script>
</body>
</html>